﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Mengsk.ERP.App.ArrvieInDelivery
{
    class ArrvieInDeliveryViewModel : DependencyObject
    {
        public static readonly DependencyProperty DeliveryCompanyProperty = DependencyProperty.Register("DeliveryCompany", typeof(string), typeof(ArrvieInDeliveryViewModel));
        public static readonly DependencyProperty ArriveInReasonProperty = DependencyProperty.Register("ArriveInReason", typeof(string), typeof(ArrvieInDeliveryViewModel));

        public string DeliveryCompany { get { return (string)this.GetValue(DeliveryCompanyProperty); } set { this.SetValue(DeliveryCompanyProperty, value); } }

        public string DeliveryNumber { get; set; }

        public string ArriveInReason { get { return (string)this.GetValue(ArriveInReasonProperty); } set { this.SetValue(ArriveInReasonProperty, value); } }

        public string Action { get { return "删除"; } }

        public ERP.Delivery.ArrvieInDelivery ToArriveInDelivery()
        {
            var item = new ERP.Delivery.ArrvieInDelivery
            {
                DeliveryCompany = this.DeliveryCompany,
                DeliveryNumber = this.DeliveryNumber,
                ArriveReason = this.ArriveInReason,
                Comment = "",
                CreateTime = DateTime.Now
            };

            return item;
        }
    }
}
